package ex.com.jm.food.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Email;



/**
 * 管理员实体层
 * @author zhaojw
 *
 */
@Entity
@Table(name="jm_admin")
public class Admin implements Serializable{
	
 
	private static final long serialVersionUID = 1L;
	@Id
	@GenericGenerator(name="admin_id",strategy="uuid")
	@GeneratedValue(generator="admin_id")
	@Column(name="admin_id",nullable=false,unique=true,length=32)
	private String adminId;  //主键id
	@Column(name="admin_name",nullable=false,unique=true,length=32)
    private String adminName;//管理员名称
	@Column(name="admin_email",nullable=false,unique=true,length=32)
	@Email(message="邮箱格式不正确")
    private String adminEmail;//管理员邮箱，登录用户
	@Column(name="admin_pwd",nullable=false,length=32)
    private String adminPwd;//管理员密码
	@Column(name="type",nullable=false,length=2,columnDefinition="INT default 0")
    private Integer type;//区分管理员还是超级管理员，默认值为0（1：超级管理员；0:普通管理员）
	@Column(name="status",nullable=false,length=2,columnDefinition="INT default 0")
    private Integer status;//管理员账户状态(1:启用；0:停用)默认值为1
	@Column(name="created",nullable=false,length=32)
    private String created;//管理员账户创建时间
	@Column(name="updated",nullable=false,length=32)
    private String updated;//管理员账户创建时间
	@Column(name="is_adm",nullable=false,length=32)
	private String isAdm;//是否为管理员,默认为Y
	public String getAdminId() {
		return adminId;
	}
	public void setAdminId(String adminId) {
		this.adminId = adminId;
	}
	public String getAdminName() {
		return adminName;
	}
	public void setAdminName(String adminName) {
		this.adminName = adminName;
	}
	public String getAdminEmail() {
		return adminEmail;
	}
	public void setAdminEmail(String adminEmail) {
		this.adminEmail = adminEmail;
	}
	public String getAdminPwd() {
		return adminPwd;
	}
	public void setAdminPwd(String adminPwd) {
		this.adminPwd = adminPwd;
	}

	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public String getCreated() {
		return created;
	}
	public void setCreated(String created) {
		this.created = created;
	}
	public String getUpdated() {
		return updated;
	}
	public void setUpdated(String updated) {
		this.updated = updated;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public String getIsAdm() {
		return isAdm;
	}
	public void setIsAdm(String isAdm) {
		this.isAdm = isAdm;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	
    
}
